<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="../WEB-INF/layout/template.xhtml">

    <ui:define name="center_content">
        <rich:jQuery selector="#tab_tribes" query="addClass('ui-tabs-selected')" />
	<rich:panel id="memberPanel" >
        <h1>#{languageTeamAction.locale.retrieveNativeName()}</h1>
        <p>#{messages['jsf.SizeMembers']}</p>
		<rich:dataTable 
		    id="threads"
		    value="#{languageTeamAction.locale.members.toArray()}" 
		    var="member" rendered="#{languageTeamAction.locale.members.size != 0}">

		  <rich:column width="auto">
		    <f:facet name="header">#{messages['jsf.Username']}</f:facet>
		    #{member.account.username}
		  </rich:column>
		  <rich:column width="auto">
		    <f:facet name="header">#{messages['jsf.Name']}</f:facet>
		    #{member.name}
		  </rich:column>
		  <rich:column width="auto">
		    <f:facet name="header">#{messages['jsf.Email']}</f:facet>
		    #{member.email}
		  </rich:column>
		</rich:dataTable>
        </rich:panel>
    </ui:define>

    <ui:define name="left_content">
      <rich:panel id="actionPanel" rendered="#{identity.loggedIn}">
        <f:facet name="header">
          #{messages['jsf.Actions']}
        </f:facet>
        <a:form id="Language_team_member_toggle_form" ajaxSubmit="true" reRender="actionPanel,tribesTabDiv,memberPanel">
          <a:commandLink id="Join" styleClass="action_link" action="#{languageTeamAction.joinTribe}" rendered="#{not languageTeamAction.contained}">
            #{messages['jsf.JoinLanguageTeam']}
            <s:conversationId name="id" value="#{languageTeamAction.language}"/>
          </a:commandLink>
	 	  <a:commandLink id="Leave" styleClass="action_link" action="#{languageTeamAction.leaveTribe}" rendered="#{languageTeamAction.contained}">
            #{messages['jsf.LeaveLanguageTeam']}
            <s:conversationId name="id" value="#{languageTeamAction.language}"/>
          </a:commandLink>
        </a:form>
      </rich:panel>
    </ui:define>


</ui:composition>
